package models;


import java.util.ArrayList;
import java.util.List;

import org.bson.types.ObjectId;

import play.modules.mongo.MongoEntity;
import play.modules.mongo.MongoModel;

import play.db.jpa.Blob;
@MongoEntity("users")

public class User extends MongoModel{
	public  String getEmail() {
		return get("email");
	}
	public void setEmail(String email) {
		set("email",email);
	}
	
	public String getName() {
		return get("name");
	}
	public void setName(String name) {
		set("name",name);
	}
	
	public String getMonth(){
		return get("month");
	}
	public void setMonth(String month){
		set("month",month);
	}
	public String getDay(){
		return get("day");
	}
	public void setDay(String day){
		set("day",day);
	}
	public String getYear(){
		return get("year");
	}
	public void setYear(String year){
		set("year",year);
	}
	
	public String getPassword() {
		return get("password");
	}
	public void setPassword(String password) {
		set("password",password);
	}
	
	public String getGroup(){
		return get("group");
	}
	public void setGroup(String group) {
		set("group",group);
	}
	public String getGroupID(){
		return get("groupid");
	}
	public void setGroupID(String groupid){
		set("groupid",groupid);
	}
	public Group groupName(){
		return Group.find("byName",getGroup()).first();
	}
	public void group(Group value){
		setGroup(value.getId());
	}
	
	public List<String> getPhoto(){
		if(!has("photo")){
			setPhoto(new ArrayList<String>());
		}
		return get("photo");
	}
	public void setPhoto(List<String> photo){
		set("photo",photo);
	}
	public String getPrPhoto() {
		return get("prphoto");
	}
	public void setPrPhoto(String prphoto) {
		set("prphoto",prphoto);
	}
	
}
